@()(implicit request: play.api.mvc.RequestHeader)
@admin.main("用户管理") {
	<div class="container">
		<div class="row">
			<div class="form-group col-sm-12">
				<h2 class="page-heading"
				style="text-align: left;
					border-bottom: 5px solid #e9f3f4">
					用户管理
				</h2>
			</div>
		</div>

		<div id="toolbar">
			<button type="button" class="btn btn-primary" id="deleteButton" onclick="UserManage.addShow">
				<i class="fa fa-plus"></i>&nbsp;新增用户
			</button>
		</div>

		<div class="table-responsive" id="tableContent">
			<table class="display table table-bordered" id="table" data-pagination="true" data-search="true"
			data-toolbar="#toolbar" data-page-list="[10, 25, 50, 100, all]" data-multiple-search="true">
				<thead>
					<tr>
						<th data-field="name" data-sortable="true">用户名</th>
						<th data-field="createTime" data-sortable="true">创建时间</th>
						<th data-field="operate" data-formatter="UserManage.operateFmt">操作</th>
					</tr>
				</thead>
			</table>
		</div>

		<div id="addModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog" style="width: 800px">
				<div class="modal-content">
					<div class="modal-header bg-primary">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
						<h4 class="modal-title">
							<i class="fa fa-plus"></i>
							<span id="lblAddTitle" style="font-weight: bold">新增用户</span>
						</h4>
					</div>
					<form class="form-horizontal" id="form" action="" data-toggle="validator" enctype="multipart/form-data">
						<div class="modal-body">
							<div class="row-fluid">

								<div class="form-group">
									<label class="control-label col-sm-3">用户名:</label>
									<div class="col-sm-6">
										<input class="form-control" name="name"/>
									</div>
								</div>

								<div class="form-group">
									<label class="control-label col-sm-3">密码:</label>
									<div class="col-sm-6">
										<input class="form-control" name="password" />
									</div>
								</div>

							</div>
						</div>
						<div class="modal-footer bg-info">
							<input type="hidden" id="ID" name="ID" />
							<button type="button" class="btn blue" onclick="UserManage.add">确定</button>
							<button type="button" class="btn green" data-dismiss="modal">取消</button>
						</div>
					</form>
				</div>
			</div>
		</div>

		<div id="updateModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog" style="width: 650px">
				<div class="modal-content">
					<div class="modal-header bg-primary">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
						<h4 class="modal-title">
							<i class="fa fa-repeat"></i>
							<span id="lblAddTitle" style="font-weight: bold">重置密码</span>
						</h4>
					</div>
					<form class="form-horizontal" id="updateForm" action="" data-toggle="validator">
						<div class="modal-body">
							<div class="row-fluid">

								<div class="form-group">
									<label class="control-label col-sm-3">用户名:</label>
									<div class="col-sm-6">
										<input class="form-control" name="name"  readonly/>
									</div>
								</div>


								<div class="form-group">
									<label class="control-label col-sm-3">密码:</label>
									<div class="col-sm-6">
										<input class="form-control" name="password" />
									</div>
								</div>

							</div>
						</div>
						<div class="modal-footer bg-info">
							<input type="hidden" id="id" name="id" />
							<button type="button" class="btn blue" onclick="UserManage.update">
								确定</button>
							<button type="button" class="btn green" data-dismiss="modal">
								取消</button>
						</div>
					</form>
				</div>
			</div>
		</div>


	</div>

			<script>
			$(function () {
				UserManage.init
			})

	</script>

}